<?php include("src/addEps_cs.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href='css/coolMessage.css' type='text/css' rel='stylesheet' media='screen' />
<title>Adicionar EPS :: ASSC</title>
<script language="javaScript" type="text/javascript" src="js/jquery.js"></script>
<script language="javaScript" type="text/javascript" src="js/jquery.simplemodal.js"></script>
<script language="javaScript" type="text/javascript" src="js/coolMessage.js"></script>

<script language="javascript" type="text/javascript">
	
	var displayRow = '';
	if (navigator.appName == "Netscape")
		displayRow = 'table-row';
	else if (navigator.appName.indexOf("Explorer") != -1) 
		displayRow = 'block';
	
	function validate(action){
		document.getElementById("action").value = action;//1: save, 2: save and continue.
		
		var msg = '';
		var name   			= document.getElementById("eps_name").value;
		var porc   			= document.getElementById("eps_porc").value;

			
		if(name == '') 
			msg='- Por favor entre el nombre de la EPS. <br />';
		
		if(porc == '') 
			msg='- Por favor entre el porcentaje de la EPS. <br />';
	
//		if(cli_email == '') 
//			msg='- Please enter the email. <br />';
//		else{
//			if ( ! isMail (cli_email) )
//				msg += '- Wrong email.<br />';
//		}
	

		if(msg==''){
			document.getElementById('form').submit();
			return true;
		}
		else{
			coolMessage("alert", msg);
			return false;
		}		
	}
	

	function onlyNumbers(e)
	{
	   var key;
	   if(window.event)
		  key = window.event.keyCode;   //IE
	   else
		  key = e.which;                //firefox
	   if (!( (key >= 48 && key <= 57) || key ==8 || key ==9 || key ==0 || key ==46 ))
		  return false;
	   else
		  return true;
	}	
	
</script>
</head>
<body>
<?php $item_select = 11;include("menu.php");?><br />
    <form name="form" id="form" method="post" action="" enctype="multipart/form-data">
    <input type="hidden" name="addEps" id="addEps" value="1"/>
	<input type="hidden" name="action" id="action" value="1"/>
    
    <div class="content_grv">
		<table width="80%" align="center" class="shadow">
            <tr>
                <td class="title">Informacion EPS</td>
            </tr>
            <tr>
                <td>
                    <table class="tbl_form" align="center">
                        <tr>
                            <td width="35%" align="right"><span class="lbl_gray">Nombre:</span></td>
                            <td width="1%">&nbsp;</td>
                            <td><input type="text" name="eps_name" id="eps_name" class="text_grv" size="40" maxlength="40" /></td>
                        </tr>
                        <tr>
                            <td align="right"><span class="lbl_gray">Porcentaje:</span></td>
                            <td>&nbsp;</td>
                            <td><input type="text" name="eps_porc" id="eps_porc" class="text_grv" size="11" maxlength="10"/></td>
                        </tr>
						<tr>
                            <td align="right" valign="top"><span class="lbl_gray">Descripcion:</span></td>
                            <td>&nbsp;</td>
                            <td><textarea name="eps_description" id="eps_description" class="text_grv" cols="40" rows="7"></textarea></td>
                        </tr>
                        <tr>
                            <td colspan="3" align="center">&nbsp;</td>
                        </tr>
                        <tr>
                            <td colspan="3" align="center">
                                <input type="button" class="button_grv" value="Save" onclick="javascript: return validate(1);" />
                                <input type="button" class="button_grv" value="Save and continue" onclick="javascript: return validate(2);" />
                                <input type="reset" value="Reset" class="button_grv_cancel"/>
                                <input type="button" class="button_grv_cancel" value="Cancel" onClick="javascript:window.location.href='listEps.php';" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
 	</div>
</form>    
</body>
</html>
<?php include('divscoolmessage.php');?>